package com.grupoconstruobras.sigo.datatransfer;

public class SimpleParametroDto implements IParametroDto {

	private Object value;
	private Object key;
	
	public SimpleParametroDto(int key, Object value) {
		this.key = key;
		this.value = value;
	}
	
	public SimpleParametroDto(String key, Object value) {
		this.key = key;
		this.value = value;
	}
	
	public Object getValue() {
		return value;
	}
	
	public boolean isKeyInt() {
		return key instanceof Integer;  
	}
	
	public int getKeyAsInt() {
		return ((Integer)key).intValue();
	}
	public String getKeyAsString() {
		if(key instanceof Integer)
			return ((Integer)key).toString();
		return (String) key;
	}
}
